package com.sweet.logging.storage.entity;

import com.sweet.logging.storage.utils.DateTimeUtils;

/**
 * <h1></h1>
 * <p>
 * <b>描述：</b>
 * <br>
 * <br>
 * </p>
 *
 * @author xiexiaofeng
 * @version 1.0     2017年09月08日  18点23分
 */
public class LogMessage
{

    private String client;

    private long timeStamp;

    private String message; // 正文

    private String level;

    private String name; // 日志信息所在的类名

    public String getClient()
    {
        return client;
    }

    public void setClient(String client)
    {
        this.client = client;
    }

    public long getTimeStamp()
    {
        return timeStamp;
    }

    public void setTimeStamp(long timeStamp)
    {
        this.timeStamp = timeStamp;
    }

    public String getMessage()
    {
        return message;
    }

    public void setMessage(String message)
    {
        this.message = message;
    }

    public String getLevel()
    {
        return level;
    }

    public void setLevel(String level)
    {
        this.level = level;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    @Override
    public String toString()
    {
        return DateTimeUtils.format(timeStamp) + " " + client + level + " [" + name.trim() +"] " + message + "#sweet_end#\r\n";
    }

}
